﻿// MT298




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category2
{
  public class MT298 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT298.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Sub-Message Type")]
    public MT298.Tag12 SubMessageType_12
    {
      get
      {
        return new MT298.Tag12((SwiftElement) this, 0, (SwiftDefinitionElement) MT298.U0004);
      }
    }

    [Description("Sub-Message Type")]
    public MT298.Tag12 Tag12_SubMessageType
    {
      get
      {
        return this.SubMessageType_12;
      }
    }

    [Description("Proprietary Message")]
    public Tag77E ProprietaryMessage_77E
    {
      get
      {
        return new Tag77E((SwiftElement) this, 0, (SwiftDefinitionElement) MT298.U0006);
      }
    }

    [Description("Proprietary Message")]
    public Tag77E Tag77E_ProprietaryMessage
    {
      get
      {
        return this.ProprietaryMessage_77E;
      }
    }

    public MT298()
      : base(true)
    {
    }

    public MT298(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT298.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT298.MessageDefinition = new SwiftMessageDefinition("MT298", "Proprietary Message");
      MT298.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT298.U0002.TagName = ":20:";
      MT298.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT298.U0002.Elements.Add((SwiftDefinitionElement) MT298.U0003);
      MT298.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT298.U0002);
      MT298.U0004 = new SwiftTagDefinition("SubMessageType_12", "Sub-Message Type");
      MT298.U0004.TagName = ":12:";
      MT298.U0005 = new SwiftTagSubItemDefinition("Type", "Sub Message");
      MT298.U0004.Elements.Add((SwiftDefinitionElement) MT298.U0005);
      MT298.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT298.U0004);
      MT298.U0006 = new SwiftTagDefinition("ProprietaryMessage_77E", "Proprietary Message");
      MT298.U0006.TagName = ":77E";
      MT298.U0007 = new SwiftTagSubItemDefinition("Line1_77E", "");
      MT298.U0008 = new SwiftTagSubItemDefinition("Text1", "Text");
      MT298.U0008.Mandatory = false;
      MT298.U0007.Elements.Add((SwiftDefinitionElement) MT298.U0008);
      MT298.U0006.Elements.Add((SwiftDefinitionElement) MT298.U0007);
      MT298.U000E = new SwiftTagSubItemDefinition("Text2", "Text");
      MT298.U000E.Mandatory = false;
      MT298.U0006.Elements.Add((SwiftDefinitionElement) MT298.U000E);
      MT298.U000F = new SwiftTagSubItemDefinition("ProprietaryMessage", "Proprietary Message");
      MT298.U000F.Mandatory = false;
      MT298.U0010 = new SwiftTagSubItemDefinition("ProprietaryMessage_1", "Proprietary Message");
      MT298.U0010.Mandatory = false;
      MT298.U000F.Elements.Add((SwiftDefinitionElement) MT298.U0010);
      MT298.U0006.Elements.Add((SwiftDefinitionElement) MT298.U000F);
      MT298.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT298.U0006);
    }

    public class Tag12 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("12", value);
        }
      }

      internal Tag12(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
